﻿<!DOCTYPE html>
<html lang="zh-CN">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	
	<title>商户登录</title>
	<meta name="keywords" content="" />
	<meta name="description" content="" /> 

	<link rel="stylesheet" type="text/css" href="../public/login/vendor/bootstrap/css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="../public/login/fonts/font-awesome-4.7.0/css/font-awesome.min.css">
	<link rel="stylesheet" type="text/css" href="../public/login/fonts/iconic/css/material-design-iconic-font.min.css">
	<link rel="stylesheet" type="text/css" href="../public/login/css/util.css">
	<link rel="stylesheet" type="text/css" href="../public/login/css/main.css">

</head>

<body>

	<div class="limiter">
		<div class="container-login100" style="background-image: url('../public/login/images/bg-01.jpg');">
			<div class="wrap-login100 p-l-55 p-r-55 p-t-65 p-b-54">
				<form class="login100-form validate-form" id="infos">
					<span class="login100-form-title p-b-49">登录</span>

					<div class="wrap-input100 validate-input m-b-23" data-validate="请输入商户名">
						<span class="label-input100">商户名</span>
						<input class="input100" type="text" name="n" placeholder="请输入商户名" value="" autocomplete="off">
						<span class="focus-input100" data-symbol="&#xf206;"></span>
					</div>

					<div class="wrap-input100 validate-input" data-validate="请输入密码">
						<span class="label-input100">密码</span>
						<input class="input100" type="password" name="p" value="" placeholder="请输入密码">
						<span class="focus-input100" data-symbol="&#xf190;"></span>
					</div>

					<div class="text-right p-t-8 p-b-31">
		
					</div>

					<div class="container-login100-form-btn">
						<div class="wrap-login100-form-btn">
							<div class="login100-form-bgbtn"></div>
							<button  type="button"  id="save"  class="login100-form-btn">登 录</button>
						</div>
					</div>

					
					
				</form>
			</div>
		</div>
	</div>


<script src="../public/login/vendor/jquery/jquery-3.2.1.min.js"></script>
<script src="../public/layer/layer.js"></script>
<link rel="stylesheet" href="<?=CSS?>/ui/css/layui.css?id=<?=rand(1111,2122)?>"  media="all">


<script>

$(document).ready(function(){

 $("#save").click(function(){

     var data = $("#infos").serialize();
                      $.ajax({
                            'type': 'POST',
                            'url': "./index.php",
                            'data': data,
                            'dataType': 'text',
                            success: function(res) {
				res = eval("(" + res + ")"); 
          			
                                if (res.e == 0) {
                                    window.parent.location.href='./home.php';
                                } else {
                                    layer.msg(res.msg);
                                }
                            },
                            error: function(res) {
                            	console.log(222223)
                            	console.log(res)
                               
                            }
                          })
 });


})        
</script>
</body>

</html>